<?php

use Illuminate\Support\Facades\Schema;
use Illuminate\Database\Schema\Blueprint;
use Illuminate\Database\Migrations\Migration;

class CreateDiscussTable extends Migration
{
    /**
     * Run the migrations.
     *
     * @return void
     */
    public function up()
    {
        Schema::create('discuss', function (Blueprint $table) {
            $table->increments('mid')->comment('评论id');
            $table->string('uid')->default(0)->comment('用户id');
            $table->char('uname',20)->comment('用户姓名');
            $table->string('sid',20)->comment('子类id');
            $table->string('pid',20)->default(0)->comment('父类id');
            $table->text('comment')->comment('用户评论');
            $table->string('dregtime')->comment('用户评论时间');
       });
    }

    /**
     * Reverse the migrations.
     *
     * @return void
     */
    public function down()
    {
        //
        Schema::drop('discuss');
    }
}
